package ar.edu.unlp.info.tesis.database.operator;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Expression;

public class GreaterEqualRestriction extends OperatorRestriction {

	public GreaterEqualRestriction(String field, Object value) {
		super(field, value);
	}

	/**
	 * ver equalField javadoc
	 */
	@Override
	public Criterion getExpresion() {
		try {
			String valor = (String) this.getValue();
			return Expression.geProperty(this.getField(), valor);
		} catch (Exception e) {
			return Expression.ge(this.getField(), this.getValue());
		}

	}

}
